/**
 * 获取参数
 * @returns {Object}
 */
function getParams() {
    var url = location.search; //获取url中"?"符后的字串
    var obj = new Object();
    if (url.indexOf("?") != -1) {
        var str = url.substr(1);
        strs = str.split("&");
        for (var i = 0; i < strs.length; i++) {
            obj[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
        }
    }
    return obj;
}


function checkRule(menuid) {
    var rule = localStorage.getItem('user_rules');
    if(rule==null){
        return false;
    }
    if (rule.length < 1) {
        return false;
    } else {
        if (rule.split(',').indexOf(menuid) < 0) {
            return false;
        }
    }
}





